v3.5.2 to v3.6.0
WARNING
You should now use the V3.6.1 else you can have problem with the NotificationTeamDto (format change)
AUTOMATIC MIGRATION
-
Use the BIAToolKit to migrate the project
-
Manage the conflict (2 solutions)
- In BIAToolKit click on "4 - merge Rejected" and search
<<<<<
in all files.
- Resolve the c manually.
- Analyze the .rej file (search "diff a/" in VS code) that have been created in your project folder
- Apply manually the change.
- In BIAToolKit click on "4 - merge Rejected" and search
-
Download, change source path and run the script V3.5.2_to_V3.6.0_Replacement.ps1
-
The Das function in front take now objects the script apply the correct change
-
The bia-table tag parameters change : 'canEdit' is replaced by 'canClickRow' 'edit' is replaced by 'clickRow'
-
The bia domain and features have change the script do the following replacement: replace
/domains/app-settings/
by/domains/bia-domains/app-settings/
replace/domains/language-option/
by/domains/bia-domains/language-option/
replace/domains/notification/
by/domains/bia-domains/notification/
replace/domains/notification-type-option/
by/domains/bia-domains/notification-type-option/
replace/domains/role-option/
by/domains/bia-domains/role-option/
replace/domains/team/
by/domains/bia-domains/team/
replace/domains/user-option/
by/domains/bia-domains/user-option/
replace
/features/background-task/
by/features/bia-features/background-task/
replace/features/notifications/
by/features/bia-features/notifications/
replace/features/users/
by/features/bia-features/users/
replace/features/users-from-directory/
by/features/bia-features/users-from-directory/
replace
import { loadAllUserOptions }
byimport { DomainUserOptionsActions }
replaceloadAllUserOptions
byDomainUserOptionsActions.loadAll
replace
import { loadAllRoleOptions }
byimport { DomainRoleOptionsActions }
replaceloadAllRoleOptions
byDomainRoleOptionsActions.loadAll
replace
import { loadAllNotificationTypeOptions }
byimport { DomainNotificationTypeOptionsActions }
replaceloadAllNotificationTypeOptions
byDomainNotificationTypeOptionsActions.loadAll
replace
import { loadAllLanguageOptions }
byimport { DomainLanguageOptionsActions }
replaceloadAllLanguageOptions
byDomainLanguageOptionsActions.loadAll
replace
import { loadDomainAppSettings }
byimport { DomainAppSettingsActions }
replaceloadDomainAppSettings
byDomainAppSettingsActions.loadAll
-
=> some import should be resolve manually
- Apply other manual step (describe bellow) at the end if all is ok, you can remove the .rej files (during the process they can be useful to resolve build problem)
MANUAL STEPS
FRONT
-
replace
this.authService.getAdditionalInfos().userData.currentSiteId.toString()
bythis.authService.getCurrentTeamId(TeamTypeId.Site).toString()
and resolve using -
replace
this.authService.getCurrentSiteId()
bythis.authService.getCurrentTeamId(TeamTypeId.Site)
and resolve using -
replace
userData.CurrentSiteId
byuserData.GetCurrentTeamId((int)TeamTypeId.Site)
and resolve using -
replace
userData.CurrentRoleIds
byuserData.GetCurrentTeam((int)TeamTypeId.Site).CurrentRoleIds
and resolve using -
replace
this.authService.getAdditionalInfos().userData.currentSiteId.toString()
bythis.authService.getCurrentTeamId(TeamTypeId.Site).toString()
and resolve using -
replace
this.authService.getCurrentSiteId()
bythis.authService.getCurrentTeamId(TeamTypeId.Site)
and resolve using -
search
this.repository.Update
Normally there are useless and can be commented.- If the item updated come form a EF request you can comment this call.
- Else (but it should be exceptionnal) you can use the function
this.repository.SetModified
.
-
If you use the Database handler feature verify it is still active in bianetconfig.json of the worker service. Now it is stop by default.
-
Search
useView = true
ortableStateKey = '
(+ here an not empty string)- This correspond to the feature where view are used.
- You should add in the corresponding *index.component.html in bia-table-controller the parameter :
-
[useViewTeamWithTypeId]="2"
(2 correspond to the Site TeamTypeId) -
But the best practice is to use a parameter mapped on the enum (see example in plane feature of BIADemo):
in *.constants.ts
export const useViewTeamWithTypeId = TeamTypeId.Site;
in views/-index/-index.component.ts (in the parameters of the class)
useViewTeamWithTypeId = this.useView ? useViewTeamWithTypeId : null;
in views/-index/-index.component.html (just add the [useViewTeamWithTypeId]="useViewTeamWithTypeId")
<bia-table-controller
[defaultPageSize]="defaultPageSize"
[length]="totalCount$ | async"
[columns]="columns"
[columnToDisplays]="displayedColumns"
(displayedColumnsChange)="displayedColumnsChanged($event)"
(filter)="searchGlobalChanged($event)"
(pageSizeChange)="onPageSizeChange($event)"
(toggleSearch)="onToggleSearch()"
(viewChange)="onViewChange($event)"
[tableStateKey]="tableStateKey"
[useViewTeamWithTypeId]="useViewTeamWithTypeId"
></bia-table-controller>
-
-
replace
getAllSites
bygetAllTeamsOfType(TeamTypeId.Site)
and resolve using -
remove
this.store.dispatch(loadAllSites());
or other call toloadAllSites
except in site feature -
If you don't use the Offline mode, disable the serviceWorker in the angular.json file :
"serviceWorker": false
BACK
Migrate the data:
- Create the migration in Package Manager Console:
Add-Migration "V3.6.0" -Context "DataContext"
- Download the file V3.6.0.cs
- Verify that the content of the Down function of your migration is similar to the Down function of the downloaded files
- If ok : Replace the content of the Up function of your migration with the content of the Up function of the downloaded file.
- If nok : apply the similar change by following "// added manually" and "// remove manually" comment
- Search the TODO in the migration file and add the DropForeignKey and AddForeignKey for all object link to Site (but not in the framework). Be careful to respect the OnDelete mode (search in old migration file the mode to use)
- Run the migration in Package Manager Console:
Update-Database -Context "DataContext"
BUILD
no change
DEPLOY
-
The secret key should now be passed at the deployment of the service and restart the app pool after set :
- Change the version of the task "BIA Deploy Service as Web" used the V2
-
Refresh the app pool after set config:
- Change the version of the task "Deploy Web Site .Net Core" used the V4